package com.love.rongapi.model.request;

import com.love.rongcommon.base.request.BaseRequest;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class UserSaveRequest extends BaseRequest {

    @ApiModelProperty(value = "昵称")
    private String nickName;

    @ApiModelProperty(value = "姓名")
    private String userName;

    @NotNull
    @Length(min = 11, max = 11)
    @Pattern(regexp = "^[1]\\d{10}$")
    @ApiModelProperty(value = "电话", required = true)
    private String mobile;
}
